@extends('host.custom.common.common')

@section('c-head')
    <script>
        var PAGE_DATA = {
            pagingObj : {
                total : 0,
                perpage : 7,
                page : 1
            }
        };
    </script>
    <script type="text/javascript">
        $(function(){
            $(".answer-btn").click(function(){
                var parCss=$(".ui-dialog-content").parent("td").attr("style","text-align:left!important");
                var dia = dialog({
                    title: '回复咨询',
                    content: '<div class="dialog-div"><div class="consult-content">咨询内容：</div><div class="consult-content-text">咖啡提神吗？为啥感觉像安眠药</div><div class="reply">回复咨询:</div><div class="textarea"><textarea></textarea></div><div class="sub-btn"><div class="btn btn-warn btn-w140x40 sub">提交</div></div></div>'
                });
                dia.showModal();
            });
        });

    </script>
@stop

@section('body')
        <!-- top_test -->
    <div id="top_test"></div>

    <!-- web_logo_search -->
    <div id="web_logo_search"></div>

    <!-- comm_nav -->
    <div id="comm_nav"></div>

    <div class="com-w mt20">
        <div class="wrapper clearfix">
            <div  class="w220 mr20 comm-left-menu">
                <div class="menu-top-title">供应商中心</div>
                <div id="leftmenuitems"></div>
            </div>

            <div class="w960 comm-main">
                <div class="main-release clearfix">
                    <div class="main-release-nav">您当前的位置：首页 > 供应商中心 > 咨询管理</div>
                    <div class="main-release-title">
                        <span class="icons"></span>
                        <span class="release-title-h3 f16">咨询管理</span>
                    </div>
                    <div class="main-release-from">

                        <div id="commTabs_1" class="comm-tabs">
                            <div class="comm-tabs-head">
                                <div class="head-item current">全部咨询</div>
                                <div class="head-item">未回复咨询</div>
                                <div class="head-item">已回复咨询</div>
                            </div>
                            <div class="comm-tabs-body S15 clearfix">
                                <!-- 全部咨询管理列表 -->
                                <div class="body-item current">
                                    <div class="comm-tbl">
                                        <div class="head">
                                            <ul class="clearfix">
                                                <li class="w66"></li>
                                                <li class="w170">商品</li>
                                                <li class="w260">内容</li>
                                                <li class="w172">回复时间</li>
                                                <li class="w46">回复</li>
                                                <li class="w246">操作</li>
                                            </ul>
                                        </div>
                                        <div id="commTabs_1_body" class="body">
                                        </div>
                                    </div>
                                    <div id="allcomm-paging" class="comm-paging" style="float: right;"></div>
                                </div>
                                <!-- 全部咨询管理列表结束 -->

                                <!-- 未回复咨询管理列表 -->
                                <div class="body-item">
                                    <div class="comm-tbl">
                                        <div class="head">
                                            <ul class="clearfix">
                                                <li class="w66"></li>
                                                <li class="w170">商品</li>
                                                <li class="w260">内容</li>
                                                <li class="w172">回复时间</li>
                                                <li class="w46">回复</li>
                                                <li class="w246">操作</li>
                                            </ul>
                                        </div>
                                        <div id="commTabs_2_body" class="body">
                                        </div>
                                    </div>
                                    <div id="comm-paging2" class="comm-paging" style="float: right;"></div>
                                </div>
                                <!-- 未回复咨询管理列表结束 -->

                                <!-- 已回复咨询管理列表-->
                                <div class="body-item">
                                    <div class="comm-tbl">
                                        <div class="head">
                                            <ul class="clearfix">
                                                <li class="w66"></li>
                                                <li class="w170">商品</li>
                                                <li class="w260">内容</li>
                                                <li class="w172">回复时间</li>
                                                <li class="w46">回复</li>
                                                <li class="w246">操作</li>
                                            </ul>
                                        </div>
                                        <div id="commTabs_3_body" class="body">
                                        </div>
                                    </div>
                                    <div id="comm-paging3" class="comm-paging" style="float: right;"></div>
                                </div>
                                <!-- 已回复咨询管理列表结束 -->
                            </div>
                        </div>

                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- foot_nav -->
    <div id="foot_nav"></div>

    <div id="bottom_main"></div>
    <!-- 全部咨询列表 -->
    <script type="text/template" id="allitem-template">
        <%_.each(obj, function(item){%>
        <div class="body S15-main" data-id="<%=item.id%>
                ">
      <span class="S15-main-left">
          <img src="<%=item.img%>"></span>
      <span class="shop">
          <%=item.proname%></span>
      <span class="clearfix f14" style="width: 260px">
          <span class="question f14" id="ask<%=item.id%>
                  ">
              <%=item.ask%></span>
          <span class="answer f14">
              <% if(item.isreply== "1" ) { %> <i>我的回复：</i>
              <%=item.reply%>
              <% } %></span>
      </span>
      <span class="restore-time">
          <%=item.time%></span>
      <span class="yes-no">
          <!-- 显示：1-是, 0-否  -->
          <% if(item.isreply== "0" ) { %>
          否
          </span>
      <span class="two-btn" data-id="<%=item.id%>
              ">
          <a class="btn btn-warn btn-w70x32 answer-btn">回复</a>
          <a class="btn btn-important btn-w70x32 delect-btn">删除</a>
      </span>
            <% } else { %>
            是
            </span>
      <span class="two-btn" data-id="<%=item.id%>
              ">
          <a class="btn btn-warn btn-w70x32 answer-btn" style="visibility: hidden;">回复</a>
          <a class="btn btn-important btn-w70x32 delect-btn">删除</a>
      </span>
            <% } %>
        </div><%});%>
    </script>
    <!-- 未回复咨询列表 -->
    <script type="text/template" id="noreply-template">
        <%_.each(obj, function(item){%>
        <div class="body S15-main" data-id="<%=item.id%>
                ">
      <span class="S15-main-left">
          <img src="<%=item.img%>"></span>
      <span class="shop">
          <%=item.proname%></span>
      <span class="clearfix f14" style="width: 260px">
          <span class="question f14" id="ask<%=item.id%>
                  ">
              <%=item.ask%></span>
          <span class="answer f14">
              <% if(item.isreply== "1" ) { %> <i>我的回复：</i>
              <%=item.reply%>
              <% } %></span>
      </span>
      <span class="restore-time">
          <%=item.time%></span>
      <span class="yes-no">
          <!-- 显示：1-是, 0-否  -->
          <% if(item.isreply== "0" ) { %>
          否
          <% } else { %>
          是
          <% } %></span>
      <span class="two-btn" data-id="<%=item.id%>
              ">
          <a class="btn btn-warn btn-w70x32 answer-btn" id="nor">回复</a>
          <a class="btn btn-important btn-w70x32 delect-btn" id="nod">删除</a>
      </span>
        </div>
        <%});%>
    </script>
    <!-- 已回复咨询列表没有回复按钮 -->
    <script type="text/template" id="yesreply-template">
        <%_.each(obj, function(item){%>
        <div class="body S15-main" data-id="<%=item.id%>
                ">
      <span class="S15-main-left">
          <img src="<%=item.img%>"></span>
      <span class="shop">
          <%=item.proname%></span>
      <span class="clearfix f14" style="width: 260px">
          <span class="question f14" id="ask<%=item.id%>
                  ">
              <%=item.ask%></span>
          <span class="answer f14">
              <% if(item.isreply== "1" ) { %> <i>我的回复：</i>
              <%=item.reply%>
              <% } %></span>
      </span>
      <span class="restore-time">
          <%=item.time%></span>
      <span class="yes-no">
          <!-- 显示：1-是, 0-否  -->
          <% if(item.isreply== "0" ) { %>
          否
          <% } else { %>
          是
          <% } %></span>
      <span class="two-btn" algin="right" data-id="<%=item.id%>
              ">
          <a class="btn btn-warn btn-w70x32" id=""
             style="visibility:hidden;margin-left:58px;">回复</a>
          <a class="btn btn-important btn-w70x32 delect-btn" id="nod">删除</a>
      </span>
        </div><%});%>
    </script>
    <!-- 确认框 -->
    <script type="text/template" id="item-confirm">
        <div class="dialog-div">
            <div>是否确认处理该条信息</div>
            <div class="price-game-btn">
                <div class="btn btn-gray btn-w140x40 remove">取消</div>
                <div class="btn btn-warn btn-w140x40" id="tj">提交</div>
            </div>
        </div>
    </script>

    <script src="/assets/b2b/js/libs/jquery.paging.min.js"></script>
    <script type="text/javascript" src="/assets/b2b/js/libs/dialog-min.js"></script>
    <script src="/assets/b2b/js/pageModules/supplyer/S15.js"></script>
@stop